package com.hst.capacity.domain.model.response.setting.price;

import cn.hutool.core.util.ObjUtil;
import com.hst.capacity.domain.model.entity.setting.line.IntercityLineEntity;
import com.hst.capacity.domain.model.entity.setting.price.IntercityPriceEntity;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
public class IntercitySearchVO {

    private Integer idPrice;
    private String idLine;
    private String idFranchisee;
    private String intercityLineName;
    private String intercityLineAlias;
    private String localServiceCall;
    private Integer status;
    private Float servicePrice;
    private Float charteredCarPrice;
    private Float carrierPrice;
//    private String regionCode;
    private String carpoolOperateTime;
    private String memo;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;
    private String createBy;
    private String updateBy;

    public IntercitySearchVO(IntercityPriceEntity priceEntity, IntercityLineEntity lineEntity) {

        this.idPrice = priceEntity.getIdIntercityLinePrice();
        this.idLine = priceEntity.getIdLine();
        this.idFranchisee = priceEntity.getIdFranchisee();
        this.intercityLineName = lineEntity.getIntercityLineName();
        this.intercityLineAlias = lineEntity.getIntercityLineAlias();
        this.localServiceCall = lineEntity.getLocalServiceCall();
        this.status = lineEntity.getOnlineStatus();
        this.servicePrice = priceEntity.getServicePrice();
        this.charteredCarPrice = priceEntity.getCharteredCarPrice();
        this.carrierPrice = priceEntity.getCarrierPrice();
        this.carpoolOperateTime = lineEntity.getCarpoolOperateTime();
        this.memo = lineEntity.getMemo();
        this.createBy = priceEntity.getCreateBy();
        this.createTime = priceEntity.getCreateTime();
        this.updateBy = priceEntity.getUpdateBy();
        this.updateTime = priceEntity.getUpdateTime();

    }

}
